package sk.vrto.web.base;

/**
 * Base presenter from the MVP pattern.
 * @param <T> Type of the view.
 */
abstract public class Presenter<T> implements EventBusAware {

    protected T view;

    /**
     * Creates new presneter and registers itself to the eventBus.
     */
    public Presenter() {
        eventBus.register(this);
    }

    /**
     * Sets the view to manage
     * @param view View from the MVP pattern.
     */
    public void setView(T view) {
        this.view = view;
    }

}
